<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    function abs(x,...rest) {

         for(let i =0;i<rest.length;i++){
             console.log(rest[i])
     }
        if(typeof x!=='number'){
            throw "not a num"
        }
        if(x>=0){
            return x
        }
        else {
            return -x
        }
        console.log(arguments[0])
    }

</script>
</body>
</html>